package com.dhcc.bpm.modules.workflow.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.dhcc.bpm.common.utils.ResResult;
import com.dhcc.bpm.modules.workflow.entity.Approve;
import com.dhcc.bpm.modules.workflow.vo.ApproveVO;
import org.springblade.core.mp.base.BaseService;
import org.springblade.core.tool.api.R;

/**
 * @ClassName ApproveController
 * @Description 工作流审批服务类
 * @Author sjm
 * @Date 2020/2/27 0027 13:14
 * @Version V1.0
 * @Copyright: 2020 东华软件 . All rights reserved.
 **/
public interface IApproveService extends BaseService<Approve> {

	/**
	 * @Description 自定义分页
	 * @Author sjm
	 * @Date 20:43 2020/3/3 0003
	 * @param page
	 * @param approve
	 * @return com.baomidou.mybatisplus.core.metadata.IPage<com.dhcc.bpm.modules.workflow.vo.ApproveVO>
	 **/
	IPage<ApproveVO> selectApprovePage(IPage<ApproveVO> page, ApproveVO approve);

	/**
	 * @Description TODO
	 * @Author sjm 
	 * @Date 9:14 2020/3/9 0009
	 * @param approve
	 * @return com.dhcc.bpm.common.utils.ResultAPI
	 **/
	R commitTask(ApproveVO approve);

	/**
	 * @Description TODO
	 * @Author sjm 
	 * @Date 9:28 2020/3/9 0009
	 * @param approve
	 * @return com.dhcc.bpm.common.utils.ResultAPI
	 **/
	R commitTaskProduct(ApproveVO approve);

	/**
	 * @Description 接受数据
	 * @Author sjm
	 * @Date 21:43 2020/3/11 0011
	 * @param opinionType
	 * @param opinion
	 * @param entity
	 * @return com.dhcc.bpm.common.utils.ResResult
	 **/
	ResResult refreshData(String opinionType,String opinion, Approve entity);

	/**
	 * @Description 查询原数据
	 * @Author sjm
	 * @Date 20:45 2020/3/4 0004
	 * @param processId
	 * @return com.dhcc.bpm.modules.workflow.entity.Approve
	 **/
	Approve selectApprove(Long processId);

	/**
	 * @Description 根据id查询
	 * @Author sjm
	 * @Date 18:39 2020/3/10 0010
	 * @param busNo
	 * @return com.dhcc.bpm.modules.workflow.vo.ApproveVO
	 **/
	ApproveVO getApproById(Long busNo);

	/**
	 * @Description 根据业务编号和产品id查询审批数据
	 * @Author sjm
	 * @Date 16:17 2020/3/31 0031
	 * @param busNo
	 * @param productId
	 * @return com.dhcc.bpm.modules.workflow.entity.Approve
	 **/
	Approve getApproByProdAppId(Long busNo, Long productId);
}
